package com.itheima.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.servlet.ModelAndView;

import java.util.List;

@Controller
public class UserController {
@RequestMapping("/s1")
    public ModelAndView aa(ModelAndView modelAndView){
    String s=null;
    int length = s.length();
    System.out.println("执行器");
    modelAndView.setViewName("success.jsp");
    return modelAndView;
 }
    @RequestMapping(value = "/s2",method = RequestMethod.POST)
    public String aa2(@RequestBody List<User> user){

        System.out.println(user);

        return "success.jsp";
    }
}
